package org.yanghaokun.pet.domain;

import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import org.yanghaokun.basic.domain.BaseDomain;
import org.yanghaokun.org.domain.Shop;
import org.yanghaokun.user.domain.User;

import java.math.BigDecimal;
import java.util.Date;

@Data
public class Pet extends BaseDomain {
    private String name;
    private String resources;
    private BigDecimal saleprice;
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
    private Date offsaletime;
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
    private Date onsaletime;
    private Integer state;
    private BigDecimal costprice;
    private Date createtime = new Date();
    private Long type_id;
    private PetType type;
    private Long shop_id;
    private Shop shop;
    private Long user_id;
    private User user;
    private Long adopt_id;
    private Long searchMasterMsgId;

    private PetDetail detail = new PetDetail();

    //按道理来说，支付方式和宠物没有关系，但是可以在这里设计一个字段仅仅用来接收值。当然你也可以新建DTO
    private Integer payType = 0; // 0 余额 1 垫付 2银行转换

}
